Dynamic quantization